class CreateUserProfiles < ActiveRecord::Migration
  def self.up
    create_table :user_profiles do |t|
      t.string :firstname, :limit => 25
      t.string :lastname, :limit => 25
      t.string :mssv , :null => false,:limit => 8
      t.string :address
      t.date :birth_of_day
      t.integer :user_id,:null => false
      t.string :avatar_file_name
    t.string :avatar_content_type
    t.integer :avatar_file_size
    t.datetime  :avatar_updated_at
      t.timestamps
    end
  end
  def self.down
    drop_table :user_profiles
  end
end
